package com.xnyzc.lhy.order.entity.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 订单调度日志统计
 *
 * @author cuixiaojian
 * @since 2019-12-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "OaSysDispatchLog对象", description = "订单调度日志统计")
public class OaSysDispatchLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单号")
    @TableId(value = "order_id", type = IdType.INPUT)
    private String orderId;

    @ApiModelProperty(value = "接收到订单时间戳")
    private Long receiveOrderTimestamp;

    @ApiModelProperty(value = "订单创建完成时间戳")
    private Long createdOrderTimestamp;

    @ApiModelProperty(value = "调度开始时间戳")
    private Long dispatchStartTimestamp;

    @ApiModelProperty(value = "调度结束时间戳")
    private Long dispatchEndTimestamp;

    @ApiModelProperty(value = "同步请求时间戳")
    private Long grabRequestTimestamp;

    @ApiModelProperty(value = "同步返回时间戳")
    private Long grabResponseTimestamp;

    @ApiModelProperty(value = "eg:0 成功，10100（server error）... 同步返回结果")
    private String syncResultCode;

    @ApiModelProperty(value = "异步通知结果时间戳")
    private Long asyncNoticeGrapResultTimestamp;

    @ApiModelProperty(value = "异步通知抢单结果")
    private Integer asyncNoticeGrapResult;

    @ApiModelProperty(value = "乘客出发点经度")
    private Double passengerLng;

    @ApiModelProperty(value = "乘客出发点纬度")
    private Double passengerLat;

    @ApiModelProperty(value = "滴滴订单Id")
    private String ddOpenId;

    @ApiModelProperty(value = "距离 km")
    private Double dispatchDistance;

    @ApiModelProperty(value = "距离 km")
    @TableField(exist = false)
    private Integer type;

    @ApiModelProperty(value = "城市ID")
    @TableField(exist = false)
    private String cityId;

    @ApiModelProperty(value = "时间戳")
    @TableField(exist = false)
    private Long timestamp;
    @ApiModelProperty(value = "logId")
    @TableField(exist = false)
    private Long logId;

    @ApiModelProperty(value = "司机ID")
    private Long driverId;

    @ApiModelProperty(value = "司机经度")
    private Double driverLng;

    @ApiModelProperty(value = "司机纬度")
    private Double driverLat;

    @ApiModelProperty(value = "司机来源( 0 预估调度 1 - 派单调度)")
    @TableField(exist = false)
    private Integer driverSource;


    public static final String ORDER_ID = "order_id";

    public static final String RECEIVE_ORDER_TIMESTAMP = "receive_order_timestamp";

    public static final String CREATED_ORDER_TIMESTAMP = "created_order_timestamp";

    public static final String DISPATCH_START_TIMESTAMP = "dispatch_start_timestamp";

    public static final String DISPATCH_END_TIMESTAMP = "dispatch_end_timestamp";

    public static final String GRAB_REQUEST_TIMESTAMP = "grab_request_timestamp";

    public static final String GRAB_RESPONSE_TIMESTAMP = "grab_response_timestamp";

    public static final String SYNC_RESULT_CODE = "sync_result_code";

    public static final String ASYNC_NOTICE_GRAP_RESULT_TIMESTAMP = "async_notice_grap_result_timestamp";

    public static final String ASYNC_NOTICE_GRAP_RESULT = "async_notice_grap_result";

    public static final String PASSENGER_LNG = "passenger_lng";

    public static final String PASSENGER_LAT = "passenger_lat";

    public static final String DD_OPEN_ID = "dd_open_id";

    public static final String DISPATCH_DISTANCE = "dispatch_distance";

}
